﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <meta http-equiv="expires" content="0" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="renderer" content="webkit" />
    <meta name="mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />
    <meta content="telephone=no" name="format-detection" />     
    <link href="../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
     <script src="../js/jquery-1.11.1.min.js" type="text/javascript"></script>
    <script src="../../Scripts/bootstrap-3.3.4-dist/js/bootstrap.js"></script>
    <script src="../../Scripts/layer-v1.9.3/layer/layer.js"></script>
    <script src="../../Scripts/commen_js/jquery.cookie.min.js"></script>
    <script src="../../Scripts/commen_js/json2.js"></script>
     <script src="../js/MJ_JSComment_two.js"></script>
    <title>订购新套餐</title>
    <style type="text/css">

        li {
        cursor:pointer; padding-left:10px ;padding-top:4px; padding-bottom:4px}
    </style>
    <script type="text/javascript">
        $(document).ready(function () {
            var code = GetQueryString("code");
            //获取openid
            poststr = "{\"type\":\"getopenid\",\"code\":\"" + code + "\"}";
            mj_js_ajax("json", poststr, getopenid);
            $("#putdown li").on("click", function () {
                var content = $(this).text();
                document.getElementById('Span3').style.marginTop = '9px';
                $("#Span1").text(content);

            })

        })
        var tijiaoqing = "0";//0没有1有
        function getopenid(data) {
            if (data.result == "ok") {
                $.cookie("openid", data.msg);
            }
            else { }
        }
        function GetQueryString(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            var r = window.location.search.substr(1).match(reg);
            if (r != null) return unescape(r[2]); return null;
        }
        function submit() {
            var code = $.cookie("openid");
            poststr = "{\"type\":\"getbuywater\",\"code\":\"" + code + "\"}";
            mj_js_ajax("json", poststr, showdetale);
        }
        function getdetale(content) {
            var cen = "";
            switch (content) {

                case "茶山甘泉A套餐":
                    cen = "250元=20桶水";
                    break;
                case "茶山甘泉B套餐":
                    cen = "360元=30桶水";
                    break;
                case "茶山甘泉C套餐":
                    cen = "460元=40桶水";
                    break;

                case "七井山泉A套餐":
                    cen = "280元=20桶水";
                    break;
                case "七井山泉B套餐":
                    cen = "410元=30桶水";
                    break;
                case "七井山泉C套餐":
                    cen = "520元=40桶水";
                    break;


                case "怡宝A套餐":
                    cen = "400元=20桶水";
                    break;
                case "怡宝B套餐":
                    cen = "570元=30桶水";
                    break;
                case "怡宝C套餐":
                    cen = "720元=40桶水";
                    break;



                case "古兜山A套餐":
                    cen = "348元=20桶水";
                    break;
                case "古兜山B套餐":
                    cen = "508元=30桶水";
                    break;
                case "古兜山C套餐":
                    cen = "648元=40桶水";
                    break;


                case "加仑加A套餐":
                    cen = "348元=20桶水";
                    break;
                case "加仑加B套餐":
                    cen = "508元=30桶水";
                    break;
                case "加仑加C套餐":
                    cen = "648元=40桶水";
                    break;

                case "华山泉A套餐":
                    cen = "360元=20桶水";
                    break;
                case "华山泉B套餐":
                    cen = "520元=30桶水";
                    break;
                case "华山泉C套餐":
                    cen = "660元=40桶水";
                    break;

            }

            return cen;
        }
        function tijiao() {
            if (tijiaoqing=="1") {
                alert("不能重复提交！");
                return false;
            }

       var louhao= $("#louhao").text();
       var sushehao = $("#sushehao").text();
       var taocan = $("#taocan").text();
       var shuifei = $("#detale").text().substring(0, 3);
       poststr = "{\"type\":\"input_taocan\",\"code\":\"" + louhao + "|" + sushehao + "|" + taocan + "|" +shuifei+"|"+ $.cookie("openid") + "\"}";
       mj_js_ajax("json", poststr, tellsusult);
        }
        function tellsusult(data) {
            if (data.result == "ok") {

                alert(data.msg);
                tijiaoqing = "1";
            }


        }
        function showdetale(data) {
            if (data.result == "ok") {
                
                var str = new Array();
                
                str = data.msg.split("|");
                layer.open({
                    type: 1,
                    title: '确认订购套餐',
                    shadeClose: true,
                    shade: 0.8,
                    area: ['90%', '90%'],
                    btn: ['确定', '取消']
                      , yes: function (index, layero) {
                          tijiao();
                          layer.close(index);

                      },cancel: function(index){
                          layer.close(index);
                      },
                      content: '<div class=""><table class="table table-condensed" style="margin-top:30px"><tr class="active"><td>楼号：</td><td id="louhao"></td></tr>' +
                          '<tr><td>宿舍号：</td><td id="sushehao"></td></tr>'+
                           '<tr class="active"><td style="padding:8px 0px 8px 4px">订购套餐：</td><td id="taocan"  style="padding:8px 0px 8px 4px"></td></tr>' +
                           '<tr class="active"><td style="padding:8px 0px 8px 4px">套餐详细：</td><td id="detale" style="padding:8px 0px 8px 4px"></td></tr></table></div>'
            
                });
                $("#louhao").text(str[1]);
                $("#sushehao").text(str[2]);
                $("#taocan").text($("#Span1").text());
                var detal = getdetale($.trim( $("#Span1").text()));
                $("#detale").text(detal);
                }
            else if (data.result == "not") {
               
                alert(data.msg);

            }
            else {

                alert(data.msg);
            }

        }
    </script>
</head>
<body>
    <!--<img src="../img/fengmian.jpg"class="img-responsive" alt="Responsive image" />-->
 <div>亲爱的用户！请您仔细阅读下面的品牌及相关套餐，待您确定选择哪个套餐后，请点开“选择套餐”栏，选定您想要的套餐，点击‘’确定‘’，订水就成功了！
邑大水行订水支付方式方便快捷，支持支付宝、微信、现金支付！支付的时候一定要核对收钱的人是不是邑大水行的工作人员，有疑问可以当场打电话到邑大水行核实，以免造成财务的损失！</div>
       <table style="margin-top:10px;margin-left:10px">
           <tr><td rowspan="2"><img src="../img/2.png"class="img-responsive" alt="Responsive image" />

               </td><td style="text-align:center">
                   <span class="profile_meta_value">做邑大最好，最快的桶装水。</span>
                    </td></tr>
                    <tr><td style="text-align:center">
                         <span style="margin-left:10px">咨询热线：15992171424（微信同号）</span><br />
                            <span style="margin-left:-88px">短号：611424</span>
                         </td></tr>

       </table>
    

    <div class="container-fluid">
        
          <table class="table" style="margin-top:10px">
              <tr><td style="width:75%; padding:8px 0px 8px 0px">
               <div class="dropdown">
                   
                   <button  style="width:100%;border-radius:4px 0px 0px 4px; height:34px" class="btn btn-default dropdown-toggle" type="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
           <span id="Span1" style=" width:80%">选择套餐</span><span id="Span3"style="margin-top:8px; float:right" class="caret"></span>
          </button>
           <ul class="dropdown-menu" id="putdown" style="width:100%" aria-labelledby="dropdownMenu1">
            <li>茶山甘泉A套餐</li>
            <li>茶山甘泉B套餐 </li>
            <li>茶山甘泉C套餐</li>

            <li>七井山泉A套餐 </li>
            <li>七井山泉B套餐</li>
            <li>七井山泉C套餐 </li>


            <li>怡宝A套餐 </li>
            <li>怡宝B套餐 </li>
            <li>怡宝C套餐 </li>

            <li>古兜山A套餐 </li>
            <li>古兜山B套餐 </li>
            <li>古兜山C套餐 </li>


            <li>加仑加A套餐 </li>
            <li>加仑加B套餐  </li>
               <li>加仑加C套餐  </li>

               <li>华山泉A套餐 </li>
               <li>华山泉B套餐 </li>
               <li>华山泉C套餐  </li>

          </ul></div></td>
              <td style="padding:8px 10px 8px 0px"><span class="input-group-btn">
        <input class="btn btn-info btn-block" style="border-radius:0px 4px 4px 0px" value="订购" onclick="submit()"  type="button"/>
      </span></td></tr></table>  
      <p style="font-size:16px !important;font-weight:600">茶山甘泉</p>
        <table class="table">
            <tr ><td style="padding:8px 0px">茶山甘泉A套餐:</td><td style="padding:8px 0px">250元=20桶水</td></tr>
              <tr ><td style="padding:8px 0px">茶山甘泉B套餐:</td><td style="padding:8px 0px">360元=30桶水</td></tr>
              <tr><td style="padding:8px 0px">茶山甘泉C套餐:</td><td style="padding:8px 0px">460元=40桶水</td></tr>
        
        </table>
         <p style="font-size:16px !important;font-weight:600">七井山泉</p>
        <table class="table">
            <tr><td style="padding:8px 0px">七井山泉A套餐: </td><td style="padding:8px 0px">280元=20桶水</td></tr>
              <tr><td style="padding:8px 0px">七井山泉B套餐:</td><td style="padding:8px 0px">410元=30桶水</td></tr>
              <tr><td style="padding:8px 0px">七井山泉C套餐:</td><td style="padding:8px 0px">520元=40桶水</td></tr>
        
        
        </table>
         <p style="font-size:16px !important;font-weight:600">怡宝</p>
        <table class="table">
            <tr><td style="padding:8px 0px">怡宝A套餐:</td><td style="padding:8px 0px"> 400元=20桶水</td></tr>
              <tr><td style="padding:8px 0px">怡宝B套餐:</td><td style="padding:8px 0px">570元=30桶水</td></tr>
              <tr><td style="padding:8px 0px">怡宝C套餐:</td><td style="padding:8px 0px">720元=40桶水</td></tr>
       
        
        </table>
         <p style="font-size:16px !important;font-weight:600">古兜山</p>
        <table class="table">
            <tr><td style="padding:8px 0px">古兜山A套餐:</td><td style="padding:8px 0px">348元=20桶水</td></tr>
              <tr><td style="padding:8px 0px">古兜山B套餐:</td><td style="padding:8px 0px">508元=30桶水</td></tr>
              <tr><td style="padding:8px 0px">古兜山C套餐:</td><td style="padding:8px 0px">648元=40桶水</td></tr>
       
        </table>
         <p style="font-size:16px !important;font-weight:600">加仑加</p>
        <table class="table">
            <tr><td style="padding:8px 0px">加仑加A套餐: </td><td style="padding:8px 0px">348元=20桶水</td></tr>
              <tr><td style="padding:8px 0px">加仑加B套餐:</td><td style="padding:8px 0px">508元=30桶水</td></tr>
              <tr><td style="padding:8px 0px">加仑加C套餐:</td><td style="padding:8px 0px">648元=40桶水</td></tr>
        
        
        </table>

        <p style="font-size:16px !important;font-weight:600">华山泉</p>
        <table class="table">
            <tr><td style="padding:8px 0px">华山泉A套餐: </td><td style="padding:8px 0px">360元=20桶水</td></tr>
            <tr><td style="padding:8px 0px">华山泉B套餐:</td><td style="padding:8px 0px">520元=30桶水</td></tr>
            <tr><td style="padding:8px 0px">华山泉C套餐:</td><td style="padding:8px 0px">660元=40桶水</td></tr>

        </table>
        <div>
           <span><span style="color:red">温馨提示：</span><br />
               •新订购套餐的用户需收2个空桶押金80元，续订老用户宿舍则不用，押金凭押金单及空桶可退还。<br />
               •邑大水行还提供家电清洁的服务，范围：洗衣机、空调等。<br />
               •饮水机价格如下： 台温机：60元/台，豪华立温机：100元/台，豪华立冰机：120元/台。<br />
               •邑大水行已经为邑大学子服务了五年，服务范围越来越广，品质有保证。<br />
               
               •凡是订购邑大水行桶装水，我们可每年提供免费清洗饮水机一次。<br />
               •如果需要饮水机或者其他问题，请加微信:15992171424或者电话联系客服。<br />
               联系电话：15992171424 （微信同号） 611424
</span> </div>
     </div>
        <img src="../img/shuihang.jpg"class="img-responsive" alt="Responsive image" />
    
</body>
</html>
